<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %> <%-- JSTL表达式（判断，循环，输出） --%>
<%@taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %> <%-- 方法表达式（字符串截取，替换） --%>
<%
    String path = request.getContextPath();
    String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!doctype html>
<html>
<head>
    <base href="<%=basePath%>">
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0"/>
    <meta name="keywords" content="" />
    <meta name="description" content="" />
    <link rel="stylesheet" href="<%=basePath%>css/amazeui.min.css">
    <link rel="stylesheet" href="<%=basePath%>css/wap.css?2">
    <title>我的</title>
</head>
<body>

<div class="pet_mian" id="top">

    <div class="pet_head">
        <header data-am-widget="header"
                class="am-header am-header-default pet_head_block">
            <div class="am-header-left am-header-nav ">
                <a href="javascript:window.history.go(-1)" class="iconfont pet_head_jt_ico">&#xe601;</a>
            </div>
            <div class="pet_news_list_tag_name">活动</div>
            <%--<div class="am-header-right am-header-nav">
              <a href="javascript:;" class="iconfont pet_head_gd_ico">&#xe600;</a>
            </div>--%>
        </header>
    </div>

    <div class="comment-wrap" style="padding:50px 0px 10px;">
        <div class="pet_comment_list_wap">

            <div data-am-widget="tabs" class="am-tabs am-tabs-default pet_comment_list_tab" >

                <div class="am-tabs-bd pet_pl_list">
                    <div data-tab-panel-0 class="am-tab-panel am-active">

                        <div class="pet_comment_list_block">
                            <div class="pet_comment_list_block_l" style="border-radius: 1rem; width: 60px; height: 60px;"><img src="${userOperator.headImg}" alt=""></div>
                            <div class="pet_comment_list_block_r">
                                <div class="pet_comment_list_block_r_info" style="padding-left: 1rem;font-weight: bold">${userOperator.operatorName}</div>
                                <div class="pet_comment_list_block_r_text" style="padding: 1rem 0 0 1rem; color: #999;">
                                    <font>功德值：${userOperator.meritPoint}</font>&nbsp;&nbsp;&nbsp;
                                    <font>奖金：${userOperator.commission} 元</font>
                                </div>
                                <div class="pet_comment_list_block_r_bottom" style="position: absolute; right: 0; top: 1rem;">
                                    <div class="pet_comment_list_bottom_info_l">
                                        <a style="color: red; border-color: red;" class="pet_article_dowload_Pg" href="javascript:;" onclick="sign(this)">
                                            <c:if test="${nowSign}">
                                                签到
                                            </c:if>
                                            <c:if test="${!nowSign}">
                                                已签到
                                            </c:if>
                                        </a>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>

    <div class="comment-wrap">
        <div class="pet_comment_list_wap">

            <div data-am-widget="tabs" class="am-tabs am-tabs-default pet_comment_list_tab">
                <div class="am-tabs-bd pet_pl_list">
                    <div data-tab-panel-0 class="am-tab-panel am-active"><%--<img style="height: 23px;margin-bottom: 5px;margin-right: 5px;" src="<%=basePath%>images/laohu.png" />--%><span style="font-weight: bold">今日新增</span><span style="color: #999;" class="am-fr"><font>功德值：${nowDatePoint}</font></span></div>
                </div>
            </div>
        </div>
    </div>
    <div class="comment-wrap" style="padding:10px 0px 10px;">

        <div class="comment-wrap">
            <div class="pet_comment_list_wap">

                <div data-am-widget="tabs" class="am-tabs am-tabs-default pet_comment_list_tab">
                    <div class="am-tabs-bd pet_pl_list" onclick="window.location.href='<%=basePath%>activity/getActivityIndex_My'">
                        <div data-tab-panel-0 class="am-tab-panel am-active"><span style="font-weight: bold">我的收藏</span><span style="color: #999;" class="am-fr am-icon-chevron-right"></span></div>
                    </div>
                    <div class="pet_comment_list_title"></div>
                    <div class="am-tabs-bd pet_pl_list" style="padding-top: 8px;" onclick="window.location.href='<%=basePath%>order/getExpressList'">
                        <div data-tab-panel-0 class="am-tab-panel am-active"><span style="font-weight: bold">我的地址</span><span style="color: #999;" class="am-fr am-icon-chevron-right"></span></div>
                    </div>
                    <div class="pet_comment_list_title"></div>
                    <div class="am-tabs-bd pet_pl_list" style="padding-top: 8px;" onclick="window.location.href='<%=basePath%>order/getOrderActivityIndex'">
                        <div data-tab-panel-0 class="am-tab-panel am-active"><span style="font-weight: bold">我的订单</span><span style="color: #999;" class="am-fr am-icon-chevron-right"></span></div>
                    </div>
                </div>
            </div>
        </div>

        <div style="text-align: center; padding-top:10px; padding-bottom:10px;">
            <img style="height: 200px;" src="<%=basePath%>images/xingzuo.png" />
        </div>
    </div>
    <jsp:include page="common.jsp">
        <jsp:param name="active" value="my" />
    </jsp:include>

    <script src="<%=basePath%>js/jquery.min.js"></script>
    <script src="<%=basePath%>js/amazeui.min.js"></script>
    <script>
        function sign(btn){
            $(btn).prop("disabled", true);
            $.post("<%=basePath%>user/sign", {}, function(res){
                if(res.code == 1){
                    alert("签到成功，奖励1点功德值");
                    window.location.reload();
                }else{
                    alert(res.message);
                    $(btn).prop("disabled", false);
                }
            });
        }
    </script>
</body>
</html>